home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
CUGUK
/
UTIL_SRC
/
C126.ZIP
/
LEX.ZIP
/
LEX.H
< prev
next >
Wrap
Text File
|
1990-01-19
|
2KB
|
68 lines
/* LEX.H
*
* lex library header file -- accessed through
* #include "lex.h"
*
* Bob Denny 28-Aug-82 Remove reference to FILE *lexin to
* eliminate dependency on standard I/O library. Only
* lexgetc() used it, and it's there now.
* Add EOF definition for standalone uses.
* Corrected comment for llnxtmax.
*
* Scott Guthery 20-Nov-83 Adapt for IBM PC & DeSmet C. Removed
* equivalence of yylval and lexval since
* a multi-typed parser wants yylval to be
* typed to be the union of the types (YYSTYPE).
*/
/*
* Description of scanning tables. The entries at the front of
* the struct must remain in place for the assembler routines to find.
*/
struct lextab {
int llendst; /* Last state number */
char *lldefault; /* Default state table */
char *llnext; /* Next state table */
char *llcheck; /* Check table */
int *llbase; /* Base table */
int llnxtmax; /* Last in next table */
int (*llmove)(); /* Move between states */
int *llfinal; /* Final state descriptions */
int (*llactr)(); /* Action routine */
int *lllook; /* Look ahead vector if != NULL */
char *llign; /* Ignore char vec if != NULL */
char *llbrk; /* Break char vec if != NULL */
char *llill; /* Illegal char vec if != NULL */
};
#define NBPW 16
#define LEXERR 256
#define LEXSKIP (-1)
#define EOF (-1)
#define LEXECHO(fp) {lexecho((fp));}
#define lextext llbuf
#define lexlast llend
struct _iobuf *lexin;
/*global*/ void comment(char *);
/*global*/ int gettoken(char *,int );
/*global*/ long integ(char *,int );
/*global*/ int lexchar(void);
/*global*/ void lexecho(struct _iobuf * );
/*global*/ int lexlength(void);
/*global*/ int _lmovi(struct lextab *,int ,int );
/*global*/ int _lmovb(struct lextab *,int ,int );
/*global*/ int lexpeekc(void);
/*global*/ struct lextab *lexswitch(struct lextab *);
/*global*/ int mapch(int ,int );
/*global*/ char *token(char * *);
/*global*/ int tst__b(int ,char *);
/*global*/ int yylex(void);
/*global*/ int llinp(void);
/*global*/ int llset(void);
/*global*/ void llinit(void);
/*global*/ void lexerror(char *,... );
/*global*/ int lexgetc(void);